3.2516 \(\int x^{-1-n} \left (a+b x^n\right ) \, dx\)

Optimal. Leaf size=16 \[ b \log (x)-\frac{a x^{-n}}{n} \]

[Out]

-(a/(n*x^n)) + b*Log[x]

_______________________________________________________________________________________

Rubi [A]  time = 0.0176003, antiderivative size = 16, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.067 \[ b \log (x)-\frac{a x^{-n}}{n} \]

Antiderivative was successfully verified.

[In]  Int[x^(-1 - n)*(a + b*x^n),x]

[Out]

-(a/(n*x^n)) + b*Log[x]

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 3.53646, size = 10, normalized size = 0.62 \[ - \frac{a x^{- n}}{n} + b \log{\left (x \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate(x**(-1-n)*(a+b*x**n),x)

[Out]

-a*x**(-n)/n + b*log(x)

_______________________________________________________________________________________

Mathematica [A]  time = 0.0127804, size = 16, normalized size = 1. \[ b \log (x)-\frac{a x^{-n}}{n} \]

Antiderivative was successfully verified.

[In]  Integrate[x^(-1 - n)*(a + b*x^n),x]

[Out]

-(a/(n*x^n)) + b*Log[x]

_______________________________________________________________________________________

Maple [A]  time = 0.018, size = 25, normalized size = 1.6 \[{\frac{1}{{{\rm e}^{n\ln \left ( x \right ) }}} \left ( b\ln \left ( x \right ){{\rm e}^{n\ln \left ( x \right ) }}-{\frac{a}{n}} \right ) } \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int(x^(-1-n)*(a+b*x^n),x)

[Out]

(b*ln(x)*exp(n*ln(x))-a/n)/exp(n*ln(x))

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x^n + a)*x^(-n - 1),x, algorithm="maxima")

[Out]

Exception raised: ValueError

_______________________________________________________________________________________

Fricas [A]  time = 0.223729, size = 28, normalized size = 1.75 \[ \frac{b n x^{n} \log \left (x\right ) - a}{n x^{n}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x^n + a)*x^(-n - 1),x, algorithm="fricas")

[Out]

(b*n*x^n*log(x) - a)/(n*x^n)

_______________________________________________________________________________________

Sympy [A]  time = 40.4747, size = 107, normalized size = 6.69 \[ \begin{cases} a x + b \log{\left (x \right )} & \text{for}\: n = -1 \\\left (a + b\right ) \log{\left (x \right )} & \text{for}\: n = 0 \\- \frac{a n}{n^{2} x^{n} + n x^{n}} - \frac{a}{n^{2} x^{n} + n x^{n}} + \frac{b n^{2} x^{n} \log{\left (x \right )}}{n^{2} x^{n} + n x^{n}} + \frac{b n x^{n} \log{\left (x \right )}}{n^{2} x^{n} + n x^{n}} + \frac{b n x^{n}}{n^{2} x^{n} + n x^{n}} & \text{otherwise} \end{cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate(x**(-1-n)*(a+b*x**n),x)

[Out]

Piecewise((a*x + b*log(x), Eq(n, -1)), ((a + b)*log(x), Eq(n, 0)), (-a*n/(n**2*x
**n + n*x**n) - a/(n**2*x**n + n*x**n) + b*n**2*x**n*log(x)/(n**2*x**n + n*x**n)
 + b*n*x**n*log(x)/(n**2*x**n + n*x**n) + b*n*x**n/(n**2*x**n + n*x**n), True))

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.216169, size = 32, normalized size = 2. \[ \frac{{\left (b n e^{\left (n{\rm ln}\left (x\right )\right )}{\rm ln}\left (x\right ) - a\right )} e^{\left (-n{\rm ln}\left (x\right )\right )}}{n} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*x^n + a)*x^(-n - 1),x, algorithm="giac")

[Out]

(b*n*e^(n*ln(x))*ln(x) - a)*e^(-n*ln(x))/n